﻿@model MvcAtletIS.Models.Links

@{
    ViewBag.Title = "Odkazy";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Editovať odkaz</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    
    <fieldset>
        <legend>Detaily</legend>

        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.CategoryId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Order)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Order)
            @Html.ValidationMessageFor(model => model.Order)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Adress)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Adress)
            @Html.ValidationMessageFor(model => model.Adress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LogoPath)
        </div>
        <div class="editor-field">
            @Html.DropDownList("LogoPath")
            @Html.ValidationMessageFor(model => model.LogoPath)
        </div>

        <p>
            Obrázok uložte do zložky [../Content/logos]
        </p>

        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>

        <p>
            <input type="submit" value="Uložiť" />
        </p>

    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na prehľad odkazov", "Index", new { CategoryId = Model.CategoryId})
</div>
